PostgreSQL does not support updateable cursors

PostgreSQL does not support updateable cursors

am 03.03.2008 08:06:03 von Premsun Choltanwanich

This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.

--=__Part0C2A8D4B.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Dear All,
=20
Regarding to my conversation on mailing list as shown below, Is my =
problem related with any function on psqlODBC ? And, How can I fix it?
=20
Thank you,
=20
Premsun
=20
>>> "Pavel Stehule" 2/12/2008 14:04 >>>
Hello
=20
PostgreSQL support updateable cursors but doesn't support updateable
views - so you cannot update views via ADO recordset. You can update
only tables.
=20
Regards
Pavel Stehule
=20
On 12/02/2008, Premsun Choltanwanich wrote:
>
>
> Dear All,
>
> I got error message 'ERROR: column "ctid" does not exist; Error =
while executing the query' when I try to query SELECT on my VIEW as =
'rsSystem.Open "SELECT * FROM v_memocatlist ORDER BY memocategory", =
connSystem, adOpenStatic, adLockOptimistic'.
>
> I found some information on internet about the PostgreSQL does not =
support updateable cursors so I change my code to be read only cursors as =
'rsSystem.Open "SELECT * FROM v_memocatlist ORDER BY memocategory", =
connSystem, adOpenForwardOnly, adLockReadOnly' then it work fine. However, =
I need to use this query for make data ready to be updated on some record.
>
> How can I fix this problem?
>
> More Information about my system.
> Database: PostgreSQL 8.3
> ODBC: psqlODBC 08.03.0100
> Language: MS Visual Basic 6.0
>
> Regards,
> Premsun
>
>
> NETsolutions Asia Limited
>
> +66 (2) 237 7247
>
>
>

NETsolutions Asia Limited
+66 (2) 237 7247
http://www.nsasia.co.th

--=__Part0C2A8D4B.0__=
Content-Type: multipart/related; boundary="=__Part0C2A8D4B.1__="

--=__Part0C2A8D4B.1__=
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Description: HTML


">


Dear All,

 

     Regarding to my conversation on mailing list =
as shown below, Is my problem related with any function on psqlODBC ? And, =
How can I fix it?

 

Thank you,

 

Premsun

 

>>> "Pavel Stehule" < ..com">pavel.stehule@gmail.com> 2/12/2008 14:04 >>>
Hello=

 

PostgreSQL support updateable cursors but doesn't support updateable R>views - so you cannot update views via ADO recordset. You can update
o=
nly tables.

 

Regards
Pavel Stehule

 

On 12/02/2008, Premsun Choltanwanich < sia.co.th">Premsun@nsasia.co.th> wrote:
>
>
> =
Dear All,
>
>      I got error =
message 'ERROR: column "ctid" does not exist; Error while executing the =
query'  when I try to query SELECT on my VIEW as 'rsSystem.Open =
"SELECT * FROM v_memocatlist ORDER BY memocategory", connSystem, adOpenStat=
ic, adLockOptimistic'.
>
>      I =
found some information on internet about the PostgreSQL does not support =
updateable cursors so I change my code to be read only cursors as  =
'rsSystem.Open "SELECT * FROM v_memocatlist ORDER BY memocategory", =
connSystem, adOpenForwardOnly, adLockReadOnly' then it work fine. However, =
I need to use this query for make data ready to be updated on some =
record.
>
>      How can I fix this =
problem?
>
> More Information about my system.
> =
Database: PostgreSQL 8.3
> ODBC: psqlODBC 08.03.0100
> =
Language: MS Visual Basic 6.0
>
> Regards,
> Premsun
&=
gt;
>
>        NETsolutions =
Asia        Limited
>
> =
;       +66 (2) 237 7247
>
>
&=
gt;




NETsoluti=
ons Asia=20
Limited



+66 (2) =
237 7247




3D"NETsolut=<br ions Asia Limited" src=3D"cid:RQHFQWYUJULD.44e30700.jpg">




--=__Part0C2A8D4B.1__=
Content-Type: IMAGE/jpg; name="IMAGE.jpg"
Content-Transfer-Encoding: base64
Content-ID:
Content-Description: JPEG image

/9j/4AAQSkZJRgABAQEBLAEsAAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlu bwIQAABtbnRyUkdC
IFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAA AAAAAAAA9tYAAQAA
AADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAABFj
cHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AA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8D4B.1__=--

--=__Part0C2A8D4B.0__=--

Re: PostgreSQL does not support updateable cursors

am 03.03.2008 15:31:36 von Richard Broersma

------=_Part_19846_4532381.1204554696125
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Sun, Mar 2, 2008 at 11:06 PM, Premsun Choltanwanich
wrote:

> Dear All,
>
> Regarding to my conversation on mailing list as shown below, Is my
> problem related with any function on psqlODBC ? And, How can I fix it?
>
>
No, the problem is not with the ODBC driver. The problem is that views in
postgresql are static non-update-able by default. So if you try to update
and record in a view using a cursor or any other sql statement, you will get
an error.

This problem can be fixed if your view meets the following criteria:

1) your view is based on only one table

2) your create rules for your view that define how updates to the view are
to be handled/cascaded to the base table.
http://www.postgresql.org/docs/8.3/interactive/sql-createrul e.html

3) since postgresql rules can only handle update statements that affect only
one tuple at a time, your cursor must only be able to update one record at a
time.


Regards,
Richard Broersma Jr.

------=_Part_19846_4532381.1204554696125
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Sun, Mar 2, 2008 at 11:06 PM, Premsun Choltanwanich <> wrote:






Dear All,

 

     Regarding to my conversation on mailing list as shown below, Is my problem related with any function on psqlODBC ? And, How can I fix it?

 
No, the problem is not with the ODBC driver.  The problem is that views in postgresql are static non-update-able by default.  So if you try to update and record in a view using a cursor or any other sql statement, you will get an error.


This problem can be fixed if your view meets the following criteria:

1) your view is based on only one table

2) your create rules for your view that define how updates to the view are to be handled/cascaded to the base table.



3) since postgresql rules can only handle update statements that affect only one tuple at a time, your cursor must only be able to update one record at a time.



Regards,
Richard Broersma Jr.


------=_Part_19846_4532381.1204554696125--